#!/usr/bin/python
# -*- coding: UTF-8 -*-

import re

email_pattern = re.compile(r"([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+(\.[a-zA-Z]{2,4}))",re.VERBOSE)
tel_pattern = re.compile(r"((1)([3|5|7|8])([0-9]{9}))",re.VERBOSE)
idcard_pattern = re.compile(r"(([1-9])([0-9]{5})([1|2])([0-9]{3})([0|1])([0-9])([0-3])([0-9]{4})([0-9X]))",re.VERBOSE)

def Match_Email(string):
	matches=[]
	for groups in email_pattern.findall(string):
		matches.append(groups[0])
	return matches

def Match_TelphoneNumber(string):
	matches=[]
	for groups in tel_pattern.findall(string):
		matches.append(groups[0])
	return matches

def Match_Idcard(string):
	matches=[]
	for groups in idcard_pattern.findall(string):
		matches.append(groups[0])
	return matches

if __name__ == '__main__':
	pass